<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <!--[if lt IE 9]>
    <script type="text/javascript" src="__SYSMET__/lib/html5shiv.js"></script>
    <script type="text/javascript" src="__SYSMET__/lib/respond.min.js"></script>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="__SYSMET__/h-ui/css/H-ui.min.css" />
    <link rel="stylesheet" type="text/css" href="__SYSMET__/h-ui.admin/css/H-ui.admin.css" />
    <link rel="stylesheet" type="text/css" href="__SYSMET__/lib/Hui-iconfont/1.0.8/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="__SYSMET__/h-ui.admin/skin/default/skin.css" id="skin" />
    <link rel="stylesheet" type="text/css" href="__SYSMET__/h-ui.admin/css/style.css" />
    <link rel="stylesheet" type="text/css" href="__SYSMET__/h-ui.admin/css/kaiguan.css" />
    <!--[if IE 6]>
    <script type="text/javascript" src="__SYSMET__/lib/DD_belatedPNG_0.0.8a-min.js" ></script>
    <script>DD_belatedPNG.fix('*');</script>
    <![endif]-->

    <!--_footer 作为公共模版分离出去-->
    
    <script type="text/javascript" src="__SYSMET__/lib/jquery/1.9.1/jquery.min.js"></script>
    <script>
		var gameNameTemp = 63;
		var time_r = {$jztime_fur};
		var time = {$jztime_fur};
		var jztime = {$jzt};
		 window.onload=function()
		{
				$.ajax({
	                type: "post",
	                url: "/caipiao/index/timeIntval",
	                data: {"uid":gameNameTemp,"jzt":jztime,"qihao":$('#touzhu_qihao').val()},
	                success: function (data) {
						$('#touzhu_shi').val(data);
						var date = JSON.parse(data);
						var nei = '';
						for (var i=0;i<date.length;i++)
						{
							nei += "第<strong>"+date[i].qihao+"</strong>期"+
					    	"<input type='hidden' name='qihao[]' value='"+date[i].qihao+"'>"+
					   		 
							"<input type='text' name='num[]' value='' class='input-text' style='width:200px;'>";
							
								nei += "<br/><br/>";
							
						}
						nei +="<input type='hidden' name='czid' value='63'>";
						$('#doc').html(nei);
	                }
	            });
		}
	</script>
    
    <script src="__TEMPLATE__/sysme/js/getTime_pk.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" src="__SYSMET__/lib/layer/2.4/layer.js"></script>
    <script type="text/javascript" src="__SYSMET__/h-ui/js/H-ui.min.js"></script>
    <script type="text/javascript" src="__SYSMET__/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->
    <script src="__TEMPLATE__/sysme/js/lobby_common.js"></script>
<title>基本设置</title>
</head>

<style type="text/css">
body {
     margin: 0px; 
}
nav{
	font-size: 14px;
}
.ul_tab li.active{
	background-color: #636363;
    color: #fff;
}
.selected{
    display: block;
}
.tab-item{
	font-size: 14px;
}
.btn-primary{
	width: 115px;
	height: 40px;
	line-height: 40px !important;
	background-color: #409eff;
	color: white;
	border-radius: 6px;
	text-align: center;
	font-size: 13px;
	cursor:pointer;
}
 .radius:hover{
 	color: #fff;
	border-color: #66b1ff;
	background-color: #66b1ff;
 }
 .bj_zh{
 	width: 100%;
    height: 100%;
    background-color: black;
    opacity: 0.3;
    position: fixed;
    top: 0;
    left: 0;
    display: none;
 }
 .tk_conunt{
 	width: 500px;
    height: 456px;
    background-color: white;
    z-index: 999999;
    position: absolute;
    top: 50%;
    left: 38%;
    display: none;
    border-radius: 8px;
 }
</style>
<body style="border:0">
<nav class="breadcrumb">
	<i class="Hui-iconfont">&#xe67f;</i>

    彩种管理
    <span class="c-gray en">&gt;</span>
    开奖过滤
    <a class="btn btn-success radius r"
       style="line-height: 1.6em; margin-top: 3px"
       href="javascript:location.replace(location.href);" title="刷新">
        <i class="Hui-iconfont">&#xe68f;</i>
    </a>
</nav>

<div style="padding:20px;height:30px;">
  	
  	<div class="new_box">
	
	<p style="padding: 10px">
    开奖结果规则：当手动开奖设置了开奖号码和自动开奖同时也开启，，开奖时优先选择手动设置的开奖号码开奖，如未设置则会根据自动开奖是否过滤号码的开关状态来开奖，如果手动开奖和自动开奖都未设置，则是会自动生成无规则开奖号码。
    </p>

<div style="width: 100%;height: 50px;">
		  	<ul class="ul_tab">
		        <li class="tab-item active">自动开奖</li>
		        <li class="tab-item">手动开奖</li>
		    </ul>
  		</div>




<div class="products">
	        <div class="main selected">
	            
	            
				<div class="page-container" style="padding-top:0;">
    <div id="tab-system" class="HuiTab">
        <div class="tabCon">
            <div class="mt-20">
                <table
                        class="table table-border table-bordered table-bg table-hover table-sort table-responsive">
                    <thead>
                    <tr class="text-c">
                        <th>ID</th>
                        <th>彩种名字</th>
                        <th>玩法</th>
                        <th>彩票备注</th>
                        <th>彩票期数</th>


                        <th>是否开启开奖过滤</th>
                    </tr>

                    </thead>
                    {volist name="list" id="v"}
                    <tbody>

                    <tr class="text-c">
                        <td>{$v.czid}</td>
                        <td>{$v.cname}</td>
                        <td>
						    {$v.wanfa}
						</td>
                        <td>{$v.beizhu}</td>
                        <td>{$v.qishu}</td>

                        <td>
                            <div class="toggle toggle--knob">
                                {if condition="$v.filter eq 1"}
                                <input type="checkbox" id="toggle--knob-{$v.id}" class="toggle--checkbox" >
                                {else/}
                                <input type="checkbox" id="toggle--knob-{$v.id}" class="toggle--checkbox" checked>
                                {/if}
                                <label class="toggle--btn" for="toggle--knob-{$v.id}" onclick="func(this,{$v.id})">
                                    <span class="toggle--feature" data-label-on="on"  data-label-off="off"></span>
                                </label>
                            </div>
                        </td>


                    </tr>
                    {/volist}
                    </tbody>
                    
                </table>
            </div>
        </div>
    </div>
    <div>
   
    </div>
</div>
	            
	        </div>
	        <div class="main">

			  <form action="{:url('index/new_kaijian')}" method="post">
			  	<div style="width: 50%;float: left;">
		    	<div id="doc">
		    	
				</div>
				例：02,03,04,06,05,01,07,08,10,09(01~10中的号码，不能重复)
				<input type="submit" style="margin-left:170px;background-color: #636363;border-color: #636363;" class="btn btn-primary radius"  value="提交" />
				
			  </div>	
			  
			  
			  <div style="width: 40%;float: right;">
						<div class="radius btn-primary">
							最近十期开奖记录
						</div>
					</div>
					<div class="bj_zh"></div>
					<div style="position: relative;">
						<div class="tk_conunt">
                            {volist name="history" id="v"}
                            <p class="history_list" style="font-size: 15px;padding-left: 43px;padding-top: 11px;" data-qh="{$v.qihao}">
                                <span>第{$v.qihao}期</span>
									<span style="margin-left: 80px;">
										{volist name="$v.kjjg" id="val"}
											{$val}
										{/volist}
									</span>
                            </p>
                            {/volist}
					</div>
					</div>
			  
			  
			  </form> 
	        </div>
	        
	    </div>

 </div>
	        
	    </div>



	<input type="hidden"  id="cp_fp_time" value="0" >
	<input type="hidden"  value="{$qihao_cur}" id="qihao_cur_spec" />
	<input type="hidden"  value="{$qihao_fur}" id="qihao_fur_spec" />
	<input type="hidden"  value="63" id="no_czid" />
	<input type="hidden"  id="fandian" value="0" >
	<input type="hidden"  id="touzhu_qihao" value="{$qihao_fur}" >
	<input type="hidden"  id="touzhu_shi" value="" >

<script type="text/javascript">
    $(function() {
        $('.skin-minimal input').iCheck({
            checkboxClass : 'icheckbox-blue',
            radioClass : 'iradio-blue',
            increaseArea : '20%'
        });
        $("#tab-system").Huitab({
            index : 0
        });
    });
</script>
<script type="text/javascript">
    function updateCpInfo(value,name) {
        $.ajax({
            type : "post",
            url : "{:url('lottery/updateCpInfo')}",
            data : {"name":name,"value":value},
            success: function (data) {
                if(!data) {
                    alert("更新失败请重试！");
                } else {
                    alert("更新成功");
                }
            }
        });
    }


    function func(obj, id) {
        if ($("#toggle--knob-"+id).is(':checked')) {
            var shijian='开启';
        }else{
            var shijian='关闭';
        }
        //alert(id);
        $.ajax({
            type : 'post',
            url : "{:url('index/change')}",
            data:{'id':id},
            dataType : 'html',
            success : function(data) {
                //console.log(data);return;
                if(data == 'true'){
                    layer.msg('已'+shijian+'!', {
                        icon : 1,
                        time : 1000
                    });
                    //setTimeout('window.location.reload()',1000);
                }

            },
             error : function(data) {
                 console.log(data.msg);
             },
        });

    }

 $(".tab-item").click(function () {
                $(this).addClass("active").siblings("li").removeClass("active");
                //需求2；鼠标放入上面的li，找到索引值，让下面的div对应索引值的添加类名，其他的删除类名；
                $(".main").eq($(this).index()).addClass("selected").siblings("div").removeClass("selected");
            });
            
    $(".radius").click(function(){
		$(".bj_zh").css('display','block');
		$(".tk_conunt").css('display','block');
	})
	
	$(".bj_zh").click(function(){
		$(this).css('display','none');
		$(".tk_conunt").css('display','none');
	})
</script>
</body>
</html>
